package com.best.eureka.config;

import com.best.eureka.interceptor.MyInterceptor;
import feign.Logger;
import feign.RequestInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Jiang Akang
 * employeeId: BG435424
 * @date 2021/7/23
 **/

@Configuration
public class FeignConfiguration {

    @Bean
    Logger.Level feignLoggerLevel() {
        // 设置日志级别： None，Basic，Headers，Full
        return Logger.Level.FULL;
    }

    @Bean
    public RequestInterceptor interceptor() {
        return new MyInterceptor();
    }

}
